import { demoTablePath,demoFormPath } from "@/constant/path"
import { path2Name } from "@/utils/routeHelper"
import { Layout } from "@/router/constant"

const DemoRoute = {
    path: '/demo',
    name: "Demo",
    meta: {
        title: 'demo'
    },
    component: Layout,
    redirect: demoTablePath,
    children: [
        {
            path: demoTablePath,
            name: path2Name(demoTablePath),
            component: () => import("@/views/demo/table.vue"),
            meta: {
                title: '表格demo'
            },
        },
        {
            path: demoFormPath,
            name: path2Name(demoFormPath),
            component: () => import("@/views/demo/form.vue"),
            meta: {
                title: '表单demo'
            },
        }
    ],
}

export default DemoRoute
